<?php
/* @var $this BukutamuController */
/* @var $model Bukutamu */
/* @var $form CActiveForm */
?>


<div class="fontcolor1668b1 fontfamcalibry font24" style="padding:3px 15px">
		<b>	Tanya Jawab</b>
</div>
<div style=""> 
<div style="width: 630px; padding:10px">
<?php if(Yii::app()->user->hasFlash('bukutamu')): ?>

<div class="flash-success">
    <?php echo Yii::app()->user->getFlash('bukutamu'); ?>
</div>
<?else :?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'bukutamu-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note fontcolorbiru0b5fa5 font12 fontfamcalibry">Isian bertanda <span class="required">*</span> wajib diisi.</p>

	<?php echo $form->errorSummary($model); ?>




<table border="0" cellpadding="0" cellspacing="0" id="id-form">
    
         <tr>
            <th valign="top" class="label fontcolorbiru0b5fa5 font12 fontfamcalibry" align="left"><?php echo $form->labelEx($model,'nama'); ?></th>
            <td class="label">
               	<?php echo $form->textField($model,'nama',array('size'=>60,'maxlength'=>255)); ?>
            </td>
            <td class="label">               
            </td>
        </tr>
        
                <tr>
            <th valign="top" class="label fontcolorbiru0b5fa5 font12 fontfamcalibry" align="left"><?php echo $form->labelEx($model,'email'); ?></th>
            <td class="label">
               	<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>255)); ?>
            </td>
            <td class="label">
                
            </td>
        </tr>
        
    
           <tr>
            <th valign="top" class="label fontcolorbiru0b5fa5 font12 fontfamcalibry" align="left">	<?php echo $form->labelEx($model,'alamat'); ?></th>
            <td class="label">
              <?php echo $form->textArea($model,'alamat',array('rows'=>2, 'cols'=>50));?>
            </td>
            <td class="label">
              
            </td>
        </tr>
         <tr>
            <th valign="top" class="label fontcolorbiru0b5fa5 font12 fontfamcalibry" align="left">	<?php echo $form->labelEx($model,'isi'); ?></th>
            <td class="label">
              <?php echo $form->textArea($model,'isi',array('rows'=>6, 'cols'=>50));?>
            </td>
            <td class="label">
              
            </td>
        </tr>
               	<?php if(CCaptcha::checkRequirements()): ?>
		<tr>
        
			<td valign="top" class="label" align="left"><div class="label fontcolorbiru0b5fa5 font12 fontfamcalibry">	<?php echo $form->labelEx($model,'verifyCode'); ?></div></td>        
			<td class="label"><?php $this->widget('CCaptcha'); ?>
            <td class="label"><div class="label"></div></td>
		</td>
        	
		</tr>
        
		<tr>
			<td valign="top" class="label" align="left"><div class="label"><b></b></div></td>
            <td class="label fontcolorbiru0b5fa5 font12 fontfamcalibry"><?php echo $form->textField($model,'verifyCode'); ?></td>
            <td class="label"><div class="label"></div></td>
		</tr>
        

        
        	<?php endif; ?>
      <tr>
            <th>&nbsp;</th>
            <td valign="top" class="label fontcolorbiru0b5fa5 font12 fontfamcalibry">
               <?php echo CHtml::submitButton('Submit'); ?>
            </td>
            <td class="label"></td>
        </tr>
</table>





	

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php endif; ?>


 <table border="0" cellpadding="5" cellspacing="1" width="100%" style="padding-left:0px;">
<tr  style="background:#375791">
  <td valign="top" align="left" class="fontcolorwhite fontfamcalibry font15" style="padding: 5px;">Daftar Tanya Jawab</td>
</tr>
<?php foreach($listbukutamu as $modelib): ?>    
                  
            <div style="position: relative;padding-top: 10px;"><?
                     
                 $isi1='';   
                
                $tgl=sql2date($modelib['tgl_create'],'d MMMM yyyy');
                $jawab='';
                if($modelib['jawaban']<>null) 
                $jawab='<div style="background:#f1f9fd;padding:5px;"><span >Admin :</span><br/>'.$modelib['jawaban'].'</div>';
			    else $jawab="";
			    $isi1 .=
				'<tr style="background:#eee;padding: 5px;">'.
				'<td valign="top" align="left" class="fontcolorbiru0b5fa5 font12 fontfamcalibry" style="padding: 5px;"><b>'.Ucwords($modelib['nama']).'</b><br/><span style="fontcolorbiru font10 fontfamcalibry italic">'.$tgl.'</span><br/><span style="fontcolorbiru font10 fontfamcalibry italic">'.$modelib['email'].'</span><br/>'.$modelib['isi'].'<br/>'.$jawab.'</td>'.
				'</tr>';
                
                echo $isi1;
                ?>



                </div>
            
             
        
              <?php endforeach; ?>
              </table>
    <div style="position:relative;">
        <?php $this->widget('CLinkPager', array(
        'pages' => $pages,
        'cssFile'=>bu().'/css/pager.css',
    )) ?>
    </div>
    


</div>
</div>